package com.film.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.film.domain.Director;

public class DirectorRowMapper implements RowMapper<Director> {

	@Override
	public Director mapRow(ResultSet res, int arg1) throws SQLException {
		Director dir = new Director();
		dir.setDirId(res.getInt("dir_id"));
		dir.setDirName(res.getString("dir_name"));
		dir.setDirNickName(res.getString("dir_nickname"));
		dir.setDirTypr(res.getString("dir_foreignName"));//dir_foreignName
		dir.setDirBirth(res.getString("dir_birth"));
		dir.setDirHeight(res.getString("dir_height"));
		dir.setDirSex(res.getString("dir_sex"));
		dir.setDirNationnality(res.getString("dir_nationality"));//dir_nationality
		dir.setDirBirthPlace(res.getString("dir_birthPlace"));
		dir.setDirStar(res.getString("dir_star"));
		dir.setDirIntroduce(res.getString("dir_introduce"));
		dir.setDirImg(res.getString("dir_img"));
		return dir;
	}

}
